package com.gxa.dr2.dto;

public class Response {


    public static ResultDTO success(){
        return new ResultDTO(200, "success");
    }

    public static ResultDTO success(Object data){
        return new ResultDTO(200, "success", data);
    }

    public static ResultDTO success(String msg){
        return new ResultDTO(200, msg);
    }

    /**
     * layui数据表格的返回
     * @param count
     * @param data
     * @return
     */
    public static LayDTO success(Long count, Object data){
        return new LayDTO(count, data);
    }


    public static ResultDTO success(Integer code, String msg, Object data){
        return new ResultDTO(code, msg, data);
    }

    public static ResultDTO error(Integer code, String msg){
        return new ResultDTO(code, msg);
    }


}
